package com.dl698.axdr;

/**
 * Get_Result选择枚举
 * 定义Get_Result数据类型的选择值
 * 
 * @author wind
 * @version 1.1.1
 */
public enum GetResultChoice {
    _ERR_NONE_SELECTED(-1),
    DAR(0),
    DATA(1);

    private final int value;

    GetResultChoice(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static GetResultChoice fromValue(long value) {
        for (GetResultChoice choice : GetResultChoice.values()) {
            if (choice.value == value) {
                return choice;
            }
        }
        throw new IllegalArgumentException("No GetResultChoice with value: " + value);
    }
}